package com.developteam.xnmall.service.impl;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Description:
 * Author: ZhangXirong 27216
 * Version: 1.0
 * Create Date Time: 2022/3/21 23:08.
 * Update Date Time:
 *
 * @see
 */

@Service
public class SendMsgToMQService {
    @Autowired
    private AmqpTemplate amqpTemplate;

    //监听结果是消息应答
    public void sendMsg(String orderId) {
        amqpTemplate.convertAndSend("ex6", "key1", orderId);
    }
}
